<div class="pageContent">
	<div class="unitBox" style="margin-left:1px;"> 
		<form class="pagerForm" method="post" action="<?cs var:config.cgipath?>mt_slog_user?action=login_info">
			<?cs include:config.cspath+"dmt_page_para.html" ?>
			<input type="hidden" name="duli_user_name" value="<?cs var:config.duli_user_name?>">
		</form>
	
		<div class="pageHeader" style="border:1px #B8D0D6 solid">
			<form onsubmit="return navTabSearch(this, 'dmt_user_login');" action="<?cs var:config.cgipath?>mt_slog_user?action=login_info" method="post">
			<div class="searchBar">
				<ul class="searchContent" >
					<li>
						<label>用户名:</label><input type="text" name="duli_user_name" id="duli_user_name" size="16" value="<?cs var:config.duli_user_name ?>" />
					</li>
				</ul>
				<div class="subBar">
					<ul>
						<li>
							<button class="buttonActive" type='submit'><i class='icon-search icon-large '></i>查找</button>
							<button type="button" class="buttonActive" onclick="return duliClearSearch()"><i class="icon-trash icon-large"></i>重填</button>
						</li>
					</ul>
				</div>
			</div>
			</form>
		</div>
	
		<div class="pageContent" style="border-left:1px #B8D0D6 solid;border-right:1px #B8D0D6 solid">
			<div>
				<table class="list" width="100%" layoutH="0">
					<thead>
						<tr>
							<th width="10">序号</th>
							<th width="40">用户名</th>
							<th width="40">登录 IP</th>
							<th width="40">IP归属地</th>
							<th width="40">登录时间</th>
							<th width="40">最后访问时间</th>
							<th width="40">登录过期时间</th>
						</tr>
					</thead>
					<tbody id="duli_list_user">
					</tbody>
				</table>
				<?cs include:config.cspath+"dmt_page.html" ?>
			</div> 
		</div>
	</div> <!-- unitBox -->
</div>

<script language="javascript" type="text/javascript">
var duli_userinfo = <?cs var:config.user_login_info ?>;

function duliClearSearch()
{
	$("#duli_user_name").val("").focus();
}

function duliSetUserList()
{
	if(duli_userinfo == null || duli_userinfo.count <= 0)
		return "";

	var ulist = duli_userinfo.list;
	var uhtml = "";
	for(var i=0, j=0; i < ulist.length; i++)
	{
		uhtml += "<tr>";
		j = (<?cs var:config.currentPage ?>-1) * <?cs var:config.numPerPage ?> + 1;
		uhtml += "<td>" + (i+j) + "</td>";
		uhtml += "<td>" + ulist[i].user_name + "</td>";
		uhtml += "<td>" + ulist[i].login_addr + "</td>";
		uhtml += "<td>" + ulist[i].login_addr_region + "</td>";
		uhtml += "<td>" + ulist[i].login_time + "</td>";
		uhtml += "<td>" + ulist[i].last_access_time + "</td>";
		if(ulist[i].expire_time == 0)
			uhtml += "<td style='font-color:red'>已过期</td>";
		else
			uhtml += "<td>" + ulist[i].expire_time + "</td>";
		uhtml += "</tr>";
	}
	return uhtml;
}

$(document).ready(function(){
	var ulist = duliSetUserList();
	$("#duli_list_user").html(ulist);

	$("select[name=numPerPage] option").each(function(){
		if(this.value == <?cs var:config.numPerPage ?>)
			$(this).attr("selected", true);
	});
});

</script>

